home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / include / Ecore_File.h < prev    next >
Encoding:
C/C++ Source or Header  |  2006-01-09  |  3.3 KB  |  104 lines

  1. /*
  2.  * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
  3.  */
  4. #ifndef ECORE_FILE_H
  5. #define ECORE_FILE_H
  6.  
  7. /*
  8.  * TODO:
  9.  * - More events, move/rename of directory file
  10.  */
  11.  
  12. #ifdef EAPI
  13. #undef EAPI
  14. #endif
  15. #ifdef WIN32
  16. # ifdef BUILDING_DLL
  17. #  define EAPI __declspec(dllexport)
  18. # else
  19. #  define EAPI __declspec(dllimport)
  20. # endif
  21. #else
  22. # ifdef __GNUC__
  23. #  if __GNUC__ >= 4
  24. #   define EAPI __attribute__ ((visibility("default")))
  25. #  else
  26. #   define EAPI
  27. #  endif
  28. # else
  29. #  define EAPI
  30. # endif
  31. #endif
  32.  
  33. #include <Ecore_Data.h>
  34. #include <time.h>
  35.  
  36. #ifdef __cplusplus
  37. extern "C" {
  38. #endif
  39.  
  40.    typedef struct _Ecore_File_Monitor       Ecore_File_Monitor;
  41.    typedef struct _Ecore_File_Monitor_Event Ecore_File_Monitor_Event;
  42.    
  43.    typedef enum
  44.      {
  45.     ECORE_FILE_EVENT_NONE,
  46.       ECORE_FILE_EVENT_CREATED_FILE,
  47.       ECORE_FILE_EVENT_CREATED_DIRECTORY,
  48.       ECORE_FILE_EVENT_DELETED_FILE,
  49.       ECORE_FILE_EVENT_DELETED_DIRECTORY,
  50.       ECORE_FILE_EVENT_DELETED_SELF,
  51.       ECORE_FILE_EVENT_MODIFIED
  52.      } Ecore_File_Event;
  53.    
  54.    
  55.    EAPI int         ecore_file_init         (void);
  56.    EAPI int         ecore_file_shutdown     (void);
  57.    EAPI time_t      ecore_file_mod_time     (const char *file);
  58.    EAPI int         ecore_file_size         (const char *file);   
  59.    EAPI int         ecore_file_exists       (const char *file);
  60.    EAPI int         ecore_file_is_dir       (const char *file);
  61.    EAPI int         ecore_file_mkdir        (const char *dir);
  62.    EAPI int         ecore_file_rmdir        (const char *dir);
  63.    EAPI int         ecore_file_recursive_rm (const char *dir);   
  64.    EAPI int         ecore_file_mkpath       (const char *path);
  65.    EAPI int         ecore_file_cp           (const char *src, const char *dst);
  66.    EAPI int         ecore_file_mv           (const char *src, const char *dst);
  67.    EAPI int         ecore_file_symlink      (const char *src, const char *dest);
  68.    EAPI char       *ecore_file_realpath     (const char *file);
  69.    EAPI int         ecore_file_unlink       (const char *file);
  70.    EAPI const char *ecore_file_get_file     (const char *path);
  71.    EAPI char       *ecore_file_get_dir      (char *path);
  72.  
  73.    EAPI int         ecore_file_can_read     (const char *file);
  74.    EAPI int         ecore_file_can_write    (const char *file);
  75.    EAPI int         ecore_file_can_exec     (const char *file);
  76.    EAPI char       *ecore_file_readlink     (const char *link);
  77.    EAPI Ecore_List *ecore_file_ls           (const char *dir);
  78.    EAPI char       *ecore_file_app_exe_get  (const char *app);
  79.    EAPI char       *ecore_file_strip_ext    (const char *file);
  80.    
  81.    EAPI Ecore_File_Monitor *ecore_file_monitor_add(const char *path,
  82.                            void (*func) (void *data,
  83.                                  Ecore_File_Monitor *ecore_file_monitor,
  84.                                  Ecore_File_Event event,
  85.                                  const char *path),
  86.                            void *data);
  87.    EAPI void        ecore_file_monitor_del(Ecore_File_Monitor *ecore_file_monitor);
  88.    EAPI const char *ecore_file_monitor_path_get(Ecore_File_Monitor *ecore_file_monitor);
  89.  
  90.    EAPI int         ecore_file_app_installed(const char *exe);
  91.    EAPI Ecore_List *ecore_file_app_list(void);
  92.        
  93.    EAPI int         ecore_file_download(const char *url, const char *dst,
  94.                     void (*completion_cb)(void *data,
  95.                                   const char *file,
  96.                                   int status),
  97.                     void *data);
  98.    EAPI int         ecore_file_download_protocol_available(const char *protocol);
  99.  
  100. #ifdef __cplusplus
  101. }
  102. #endif
  103. #endif
  104.